package com.recharge.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.recharge.common.result.ResultDO;
import com.recharge.core.entity.CardVoucherEntity;
import com.recharge.domain.query.CardVoucherQueryDO;
import com.recharge.domain.vo.CardVoucherDO;
import com.recharge.domain.vo.GoodsDO;
import com.recharge.domain.vo.VoucherRecordDO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 * 卡密表 服务类
 * </p>
 *
 * @author Reagan
 * @since 2020-10-20
 */
public interface CardVoucherService extends IService<CardVoucherEntity> {

    /**
     * 添加充值卡
     * @param domain
     * @return ResultDO
     */
    public ResultDO add(CardVoucherDO domain);

    /**
     * 编辑充值卡
     * @param domain
     * @return ResultDO
     */
    public ResultDO edit(CardVoucherDO domain);

    /**
     * 返回充值卡详情
     * @param id
     * @return ResultDO
     */
    public ResultDO get(String id);

    /**
     * 删除充值卡
     * @param id
     * @param modifier
     * @return
     */
    public ResultDO remove(String id, String modifier);

    /**
     * 查找充值卡
     * @param query
     * @return ResultDO
     */
    public ResultDO find(CardVoucherQueryDO query);

    /**
     * 批量添加充值卡
     * @param cardDO
     * @return ResultDO
     */
    public ResultDO insertAll(List<CardVoucherDO> cardDO);
    /**
     * 批量删除充值卡
     * @param cardVoucherIds
     * @return  ResultDO
     */
    public ResultDO removeList(String[] cardVoucherIds,String modifier);

    /**
     * 根据核销单的状态修改充值卡的状态
     * @param  domain
     * @return  ResultDO
     */
    public ResultDO editStatus(CardVoucherDO domain);

    /**
     * 根据核销单的状态修改充值卡的状态
     * @param  cardNo
     * @param  status
     * @return  ResultDO
     */
    public ResultDO editStatus(String cardNo, Integer status);


    public ResultDO cardCallback(CardVoucherDO cardVoucherDO);

    /**
     * 根据产品Id返回卡密
     * @param goodsNo
     * @return  ResultDO
     */
    public ResultDO getCardByGoodsNo(Integer goodsNo);

    /**
     * 根据产品Id返回卡密集合
     * @param query
     * @return  ResultDO
     */
    public ResultDO queryCardByGoodsNo(CardVoucherQueryDO query);

    /**
     * 根据商品编号查商品名称
     * @param goodsNo
     * @return  String
     */
    public String getGoodsNameByGoodsNo(Integer goodsNo);
    /**
     * 导入excel表格
     * @param
     * @return  ResultDO
     */
    public ResultDO getExcel(MultipartFile file, GoodsDO goodsDO);

    /**
     *
     * @param query
     * @return
     */
    public ResultDO findList(CardVoucherQueryDO query);
}
